<?php
namespace tp5_lib\install\logic;

use tp5_lib\common\logic\Logic;

class Monitor extends Logic
{
    public function check()
    {
        /** 需要保证可读写的文件路径，相对于public目录 */
        $writeable_files=[
            "../runtime/",
            "uploads/"
        ];
        $list=[];
        $result=true;
        foreach($writeable_files as $file){
            if(!$readable=is_readable($file)){
                $result=false;
            }
            $list[$file]=$readable;
        }
        return [$result,$list];
    }
}
